:root {
    --primary-color: #165DFF;
    --secondary-color: #36CFC9;
    --dark-color: #1D2129;
    --light-color: #F2F3F5;
    --danger-color: #F53F3F;
    --warning-color: #FF7D00;
    --success-color: #00B42A;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #F7F8FA;
    color: var(--dark-color);
    margin: 0;
    padding: 0;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--light-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

.sidebar-menu {
    padding: 1.5rem 0;
}

.menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4E5969;
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(22, 93, 255, 0.05);
    color: var(--primary-color);
}

.menu-item i {
    width: 1.25rem;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    overflow-y: auto;
    min-height: 100vh;
    padding: 1.5rem;
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #4E5969;
    cursor: pointer;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-icon {
    position: relative;
    color: #4E5969;
    font-size: 1.25rem;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* 卡片样式 */
.stat-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.875rem;
    color: #4E5969;
    font-weight: 500;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

/* 表格样式 */
.data-table {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0E42D2;
    border-color: #0E42D2;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--light-color);
    color: #4E5969;
}

.btn-outline:hover {
    background-color: var(--light-color);
}

.table-responsive {
    padding: 0 1.25rem;
}

table {
    width: 100%;
    min-width: 640px;
}

thead {
    color: #86909C;
    font-size: 0.875rem;
}

th, td {
    padding: 1rem 0.5rem;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--light-color);
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(22, 93, 255, 0.02);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(0, 180, 42, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background-color: rgba(245, 63, 63, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background-color: rgba(255, 125, 0, 0.1);
    color: var(--warning-color);
}

.badge-primary {
    background-color: rgba(22, 93, 255, 0.1);
    color: var(--primary-color);
}

.action-btn {
    background: none;
    border: none;
    color: #86909C;
    cursor: pointer;
    padding: 0.25rem;
    margin: 0 0.125rem;
    transition: color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0E42D2;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #E03030;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #00A827;
    color: white;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--light-color);
}

.pagination-info {
    font-size: 0.875rem;
    color: #86909C;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--light-color);
    color: #4E5969;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover, .page-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 表单样式 */
.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.form-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.form-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #86909C;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4E5969;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #DCDFE6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}


/* 响应式样式 */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -250px;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }

    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }
}